package com.edmond.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/admin")
public class AdminHomeController {
    //  iframe 中内嵌欢迎页面跳转
    @RequestMapping("/welcome")
    public String welcome() {
        return "/admin/welcome";
    }

    //  注销操作
    @RequestMapping("/logout")
    public String logOut(HttpSession session) {
        //  清除session信息后返回主页面
        session.invalidate();
        return "/admin/login";
    }
}
